package com.zcoj.codeSimilar.service;

import com.zcoj.codeSimilar.pojo.DTO.CodeSimilar;
import com.zcoj.codeSimilar.pojo.VO.CodeSimilarVo;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
@CacheConfig(cacheNames = "CodeSimilarService")
public interface CodeSimilarService {
	@CacheEvict(value = "CodeSimilarService",allEntries = true)
	void insertCodeSimilar(CodeSimilar codeSimilar);

	@Cacheable(key = "#p0+':searchContestCodeSimilarity'")
	List<CodeSimilarVo> searchContestCodeSimilarity (Integer cid);

	@CacheEvict(value = "CodeSimilarService",allEntries = true)
	void deleteCodeSimilarRecord(Integer cid);
}
